﻿using System.Collections.ObjectModel;

namespace Examples.ViewModels
{
    public class ToggleButtonListBoxViewModel
       
    {
        public ToggleButtonListBoxViewModel()
        {
            for (int i = 1; i <= 10; i++)
            {
                this.Items.Add(new Item() { IsEnabled = true, Name = "Item " + i.ToString(), Value = i });
            }
        }

        private ObservableCollection<Item> _items = null;

        public ObservableCollection<Item> Items
        {
            get
            {

                if (_items == null)
                {
                    _items = new ObservableCollection<Item>();
                }
                return _items;

            }
        }
    }
}
